{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "02dd7e75",
   "metadata": {},
   "source": [
    "### 支持的模型名称\n",
    "\n",
    "自己随便命名"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "7050436a",
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "from onekey_algo.structure_dnn.run_structure_survival import main as sur_main\n",
    "from collections import namedtuple\n",
    "\n",
    "# 设置参数\n",
    "feature_file = r'C:\\Users\\onekey\\Desktop\\demo/clinical.csv'\n",
    "label_file = r'C:\\Users\\onekey\\Desktop\\demo/label-RND-1.csv'\n",
    "model_root = r'C:\\Users\\onekey\\Desktop\\demo/strsur'\n",
    "\n",
    "# 模型设置\n",
    "input_dim = 8\n",
    "hidden_unit = [64, 256, 256, 128]\n",
    "dropout = 0.2\n",
    "\n",
    "params = dict(feature_file=feature_file,\n",
    "              label_file=label_file,\n",
    "              batch_size=32,\n",
    "              epochs=8,\n",
    "              init_lr=0.01,\n",
    "              input_dim=input_dim + 1,\n",
    "              hidden_unit=hidden_unit,\n",
    "              dropout=dropout,\n",
    "              optimizer='sgd',\n",
    "              retrain=r'',\n",
    "              model_root=model_root,\n",
    "              add_date=False,\n",
    "              iters_start=0,\n",
    "              iters_verbose=1,\n",
    "              save_per_epoch=True)\n",
    "# 训练模型\n",
    "Args = namedtuple(\"Args\", params)\n",
    "sur_main(Args(**params))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "ce1f8dc1",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
